Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context:
For newer versions of spark (>3.0), using the month flag 'L' in the databricks related macros leads to errors as documented here: https://github.com/calogica/dbt-date/issues/119.
In the Spark documentation (https://spark.apache.org/docs/latest/sql-ref-datetime-pattern.html) it is stated that
"'LLL': Short textual representation in the stand-alone form. It should be used to format/parse only months without any other date fields."
Whereas:
"'MMM': Short textual representation in the standard form. The month pattern should be a part of a date pattern not just a stand-alone month except locales where there is no difference between stand and stand-alone forms like in English."
Since the macro below is supposed to return the month name in a stand-alone form, the 'L' flag is probably also the preferred way to do this.
Changes:
I propose to change the flag 'L' with 'M' for the databricks related macro "spark__month_name" since this resolve the issue